/* SPDX-License-Identifier: GPL-2.0-or-later */
/*******************************************************************************
 * Allwinner SoCs hdmi2.0 driver.
 *
 * Copyright (C) 2016 Allwinner.
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 ******************************************************************************/
#ifndef _ESM_HDCP_HDMI_TX_EXCEPTIONS_H_
#define _ESM_HDCP_HDMI_TX_EXCEPTIONS_H_

/* establish starting points for application code */
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_START ESM_SYSEXCEPT_START

#define ESM_SYSEXCEPT_TX_START_ABORT  0
#define ESM_SYSEXCEPT_TX_START_NOTIFY 32

/* hard exceptions */
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_BAD_IRQ             (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 0)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HP_WRITE_FAILED         (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 1)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_LP_WRITE_FAILED         (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 2)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_MB_WRITE_FAILED         (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 3)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_RESEED_FAILED           (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 4)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_REQ_TIMER_FAILED        (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 5)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP_CLOSED_FAILED      (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 6)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP_BAD_STATE_FAILED   (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 7)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_RESET_FAILED            (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 8)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_END_FAILED              (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 9)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_LI_MSG_FAILED           (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 10)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_AKE_COMPLETE_MSG_FAILED (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 11)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP2CAPABLE_MSG_FAILED (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 12)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_VERIFY_ID_FAILED        (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 13)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_MONITOR_FAILED      (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 14)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_MSGBUFF_FAILED      (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 15)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP_CREATE_FAILED      (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 16)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP_RECREATE_FAILED    (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 17)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP_SRM_FAILED         (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 18)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_SRM_VERSION_IS_OLD_A    (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_ABORT + 19)

/* notify exceptions */
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_BAD_FSM_STATE           (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 0)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_LINK_INTEGRITY_FAILED   (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 1)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_READ_COMM_FAILED        (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 2)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP_AKE_FAILED         (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 3)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_HDCP_AKE_ENDED          (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 4)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_NO_IRQ_STAT         (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 5)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_INVALID_STATE_STAT      (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 6)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_LI_TIMEDOUT             (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 7)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_OOB_LISTRECVD_NOTIFY    (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 8)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_BAD_STATE_STAT      (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 9)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_FIFO_FAILED         (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 10)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_STATE_CHANGE_FAILED (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 11)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_STATE_READ_FAILED   (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 12)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_SKE_COMPLETE_NOTIFY     (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 13)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_SRM_VERSION_IS_OLD      (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 14)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_START_NOT_SET           (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 15)
#define ESM_HDCP_HDMI_TX_SYSEXCEPT_CEE_DIAG_UPD_OVERFLOW   (ESM_HDCP_HDMI_TX_SYSEXCEPT_START + ESM_SYSEXCEPT_TX_START_NOTIFY + 16)

#endif /* _ESM_HDCP_HDMI_TX_EXCEPTIONS_H_ */
